﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Recepcjonista/Recepcjonista.Master" AutoEventWireup="true" CodeBehind="Podgląd Klienta.aspx.cs" Inherits="Hotel_Management.Recepcjonista.Podgląd_Klienta" %>

<asp:Content ID="Content4" ContentPlaceHolderID="MainContent2" runat="server">
    <p>
        &nbsp;
        <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Larger" Text="Podgląd Klienta:"></asp:Label>
    </p>
    <p>
        &nbsp;</p>
    <p>
        Imie:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Nazwisko:</p>
    <p>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
&nbsp;&nbsp;
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Wyświetl" />
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="LinqDataSource1">
            <Columns>
                <asp:BoundField DataField="id_kl" HeaderText="id_kl" ReadOnly="True" SortExpression="id_kl" />
                <asp:BoundField DataField="imie" HeaderText="imie" ReadOnly="True" SortExpression="imie" />
                <asp:BoundField DataField="nazwisko" HeaderText="nazwisko" ReadOnly="True" SortExpression="nazwisko" />
                <asp:BoundField DataField="PESEL" HeaderText="PESEL" ReadOnly="True" SortExpression="PESEL" />
            </Columns>
        </asp:GridView>
    </p>
    <p>
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="Hotel2.App_Data.BazaDanych" EntityTypeName="" Select="new (id_kl, imie, nazwisko, PESEL)" TableName="Kliencis" Where="imie == @imie &amp;&amp; nazwisko == @nazwisko">
            <WhereParameters>
                <asp:ControlParameter ControlID="TextBox1" Name="imie" PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="TextBox2" Name="nazwisko" PropertyName="Text" Type="String" />
            </WhereParameters>
        </asp:LinqDataSource>
    </p>
</asp:Content>
